def is_prime(num):
    if num < 2:
        return False
    for i in range(2, int(num ** 0.5) + 1):
        if num % i == 0:
            return False
    return True

# 生成0到50之间的所有数
numbers = range(51)

# 找出奇数
odd_numbers = [num for num in numbers if num % 2 != 0]

# 找出偶数
even_numbers = [num for num in numbers if num % 2 == 0]

# 找出质数
prime_numbers = [num for num in numbers if is_prime(num)]

# 找出能同时被2和3整除的数
divisible_by_2_and_3 = [num for num in numbers if num % 2 == 0 and num % 3 == 0]

print("奇数:", odd_numbers)
print("偶数:", even_numbers)
print("质数:", prime_numbers)
print("能同时被2和3整除的数:", divisible_by_2_and_3)
